const WXAPI = require('../../utils/api')
Page({
  data: {
  
  },
  onLoad(options) {
    WXAPI.noticeDetail(options.id).then(res => {
      if (res.code == 0) {
        this.setData({
          notice: res.data
        });
      }
    })
  },
  onShareAppMessage(options) {
    // 用户点击右上角转发
    return {
      title: this.data.notice.title,
      path: '/pages/notice/show',
      query: 'inviter_id='+ xhs.getStorageSync('uid') + '&id=' + this.data.notice.id
    }
  },
  onShareTimeline(options) {
    // 用户点击右上角转发到朋友圈
    return {
      title: this.data.notice.title,
      path: '/pages/notice/show',
      query: 'inviter_id='+ xhs.getStorageSync('uid') + '&id=' + this.data.notice.id
    }
  },
  onShareChat(options) {
    // 用户点击右上角转发到微信群组
    return {
      title: this.data.notice.title,
      path: '/pages/notice/show',
      query: 'inviter_id='+ xhs.getStorageSync('uid') + '&id=' + this.data.notice.id
    }
  },
})